import express from 'express';
import router from './router/index.js';
import path from 'path';
const __dirname = path.resolve();

const app=express();


app.use('/img',express.static(path.join(__dirname, './img/')));
app.use('/contextImg',express.static(path.join(__dirname, './context/')));
app.use('/api',router)
app.use(express.urlencoded({extended:false}))
app.use(express.json())




app.listen('8080',function () {
  console.log('服务器开启成功');
  })